package com.ylxn;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author cenghaile
 * @version 1.0
 * 2021/7/14 17:55
 **/
public class ThreadPoolsDemo {
    public static void main(String[] args) {
        //ExecutorService threadPool = Executors.newCachedThreadPool();
        /**
         * 核数量
         */
        System.out.println(Runtime.getRuntime().availableProcessors());
        System.out.println(Runtime.getRuntime().totalMemory()/(double)1024/1024);
    }
}
